package com.usermanage;

//import com.usermanage.dataDao.CustomerJpaRepositoryFactoryBean;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;


//@EnableAutoConfiguration
//@Configuration
@EnableScheduling
@EnableTransactionManagement
@SpringBootApplication
@EnableAsync
//@EnableJpaRepositories(basePackages = {"com.usermanage"})
@ComponentScan(basePackages = {"com.usermanage.*","com.ordercore.*","com.pinza.*","com.contract.*"})
//@MapperScan("com.usermanage.Mapping")
public class UsermanageApplication extends SpringBootServletInitializer {

	//springboot 主函数启动
//	public static void main(String[] args) {
//		SpringApplication.run(UsermanageApplication.class, args);
//	}


//  tomcat启动
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		// 设置启动类,用于独立tomcat运行的入口
		return builder.sources(UsermanageApplication.class);
	}



//	@Bean
//	public SpringExceptionResolver springExceptionResolver(){
//		return new SpringExceptionResolver();
//	}

	}
